<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<security:authentication property="name" var="username" />

<!DOCTYPE html>
<html>
  <head>
    <title>Page Title</title>
    
    <link rel="stylesheet" type="text/css" href="/css/css.css" />
  </head>
  <body>
    <div class="header">
      <div class="left">
        <div id="title">Forum</div>
      </div>
      
      <div class="right">
        <div id="userArea" class="right">
          Logged in as: ${username}
          <br/>
          <a href="logout.html">Log out</a>
        </div>
      </div>
    </div>
    
    <div class="content-container">
      <jsp:include page="/jsp/include/menu.jsp"><jsp:param value="forum" name="selected"/></jsp:include>
    
      <div class="content">
        <h3>Forum</h3>
        
        <c:forEach items="${forums}" var="forum">
          ${forum.title}<br/>
          
          <c:forEach items="${forum.categories}" var="category">
            - ${category.title}: ${category.description}<br/>
          </c:forEach>
        </c:forEach>
        
      </div>
    </div>
    
    <jsp:include page="/jsp/include/footer.jsp" />
  </body>
</html>